|
Расположение в меню |
---|
Черчение -> Многоугольник |
Верстаки |
Draft, Arch |
Быстрые клавиши |
P G |
Представлено в версии |
- |
См. также |
Нет |
The Draft Polygon command creates a regular polygon on the current working plane from a center and a radius. The radius can be defined by picking a point.
A Draft Polygon can be switched from inscribed to circumscribed by changing its ДанныеDraw Mode property. The corners of a Draft Polygon can be filleted (rounded) or chamfered by changing its ДанныеFillet Radius or ДанныеChamfer Size respectively.
Regular polygon defined by two points, center and radius
See also: Draft Tray, Draft Snap and Draft Constrain.
The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts (for version 1.0).
true
and will have a filled face.See also: Preferences Editor and Draft Preferences.
See also: Property editor.
A Draft Polygon object is derived from a Part Part2DObject and inherits all its properties. It also has the following additional properties:
Draft
Area
): (read-only) specifies the area of the face of the polygon. The value will be 0.0
if ДанныеMake Face if false
.Length
): specifies the length of the chamfers at the corners of the polygon.Enumeration
): specifies if the polygon is inscribed
in a circle or circumscribed
around a circle.Integer
): specifies the number of sides of the polygon.Length
): specifies the radius of the fillets at the corners of the polygon.Bool
): specifies if the polygon makes a face or not. If it is true
a face is created, otherwise only the perimeter is considered part of the object.Length
): specifies the radius of the circle that defines the polygon.Draft
Enumeration
): specifies the Draft Pattern with which to fill the face of the polygon. This property only works if ДанныеMake Face is true
and if ВидDisplay Mode is Flat Lines
.Float
): specifies the size of the Draft Pattern.See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To create a Draft Polygon use the make_polygon
method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makePolygon
method.
polygon = make_polygon(nfaces, radius=1, inscribed=True, placement=None, face=None, support=None)
polygon
object with the given number of faces (nfaces
), and based on a circle of radius
in millimeters.inscribed
is True
, the polygon is inscribed in the circle, otherwise it will be circumscribed.placement
is None
the polygon is created at the origin and one of its vertices will lie on the X axis.face
is True
, the polygon will make a face, that is, it will appear filled.Example:
import FreeCAD as App
import Draft
doc = App.newDocument()
polygon1 = Draft.make_polygon(4, radius=500)
polygon2 = Draft.make_polygon(5, radius=750)
zaxis = App.Vector(0, 0, 1)
p3 = App.Vector(1000, 1000, 0)
place3 = App.Placement(p3, App.Rotation(zaxis, 90))
Polygon3 = Draft.make_polygon(6, radius=1450, placement=place3)
doc.recompute()